﻿<phone:PhoneApplicationPage 
    x:Class="CameraApp.Views.MainView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Landscape" Orientation="LandscapeLeft"
    mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="728"
    shell:SystemTray.IsVisible="False" Title="hello">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="640" />
            <ColumnDefinition Width="160" />
        </Grid.ColumnDefinitions>

        <Canvas x:Name="viewfinderCanvas" Width="640" Height="480" 
                   HorizontalAlignment="Left" MouseLeftButtonDown="draw_MouseLeftButtonDown" >

            <!--Camera viewfinder -->
            <Canvas.Background>
                <VideoBrush x:Name="viewfinderBrush" />
            </Canvas.Background>
        </Canvas>

        <!--Button StackPanel to the right of viewfinder>-->
        <!--<StackPanel Grid.Column="1" >
            <Button x:Name="ShutterButton" Content="Capture" Click="ShutterButton_Click" FontSize="26" FontWeight="ExtraBold" Height="75" />
        </StackPanel>-->

        <!--Used for debugging >-->
        <TextBlock Height="40" HorizontalAlignment="Left" Margin="8,428,0,0" Name="txtDebug" VerticalAlignment="Top" Width="626" FontSize="24" FontWeight="ExtraBold" />

    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True"  >
            <shell:ApplicationBarIconButton x:Name="ShutterButton" IconUri="Images/capture.png" Text="Capture" Click="ApplicationBarIconButton_Click" />
              </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
